<div class="layui-fluid" id="mark-add">
    <form class="layui-form" action="" lay-filter="mark-add-form">
        <div class="layui-form-item">
            <label class="layui-form-label febs-form-item-require">名称：</label>
            <div class="layui-input-block">
                <input type="text" name="name" minlength="2" maxlength="10" lay-verify="range|name"
                       autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">

            <button class="layui-btn " style="margin-left:5px;" lay-submit="" lay-filter="mark-add-form-submit" id="submit">保存</button>
        </div>
    </form>
</div>
<script>
    layui.use(['febs','form','validate'],function(){
        var $ = layui.$,
            form=layui.form,
            layer = layui.layer,
            febs = layui.febs,
            validate=layui.validate;

        form.verify(validate);
        form.render();

        form.on('submit(mark-add-form-submit)', function (data) {
            febs.post(ctx + 'mark', data.field, function () {
                layer.closeAll();
                febs.alert.success('新增成功');

            });
            return false;
        });
    })



</script>